<!DOCTYPE html>
<html>
<head>
   <title>CSS Animations - animation-timing-function: steps(0)</title>
   <link rel="author" title="Opera Software ASA" href="http://www.opera.com/">
   <link rel="help" href="http://dev.w3.org/csswg/css3-animations/#animation-timing-function_tag">
   <meta name="flags" content="dom invalid">
   <meta name="assert" content="steps(0) is an invalid
   animation-timing-function">
   <script src="/resources/testharness.js"></script>
   <script src="/resources/testharnessreport.js"></script>
   <style type="text/css">
      @keyframes move {
         from {
            left: 0px;
         }
         to {
            left: 100px;
         }
      }
      div {
         width: 100px;
         height: 100px;
         background: blue;
         position: relative;
      }
      .test {
         animation-name: move;
         animation-duration: 2s;
         animation-fill-mode: forwards;
         animation-timing-function: steps(4);
         animation-timing-function: steps(0);
      }
   </style>
   <script type="text/javascript">
      setup({explicit_done:true});
      onload = function() {
         var testName = document.querySelector('title').firstChild.data;
         var div = document.querySelector('div');
         var log = document.querySelectorAll('p')[1].firstChild;
         setTimeout(function() {
            var observed = getComputedStyle(div, null).left;
            var passed = (observed == '25px');
            test(function(){assert_true(passed);}, testName); done();
            log.data = (passed ? 'PASS if the animation occurred.'
               : 'FAIL (got ' + observed + ')');
         }, 600);
         div.className = 'test';
      }
   </script>
   <style>iframe{display:none}</style>
</head>
<body>
   <p>The square below should jump right in 4 steps.</p>
   <p>Testing...</p>
   <div></div>
</body>
</html>
